/*
 * @Author: your name
 * @Date: 2022-02-01 21:21:56
 * @LastEditTime: 2022-03-06 19:10:23
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \vue3-ts-food-admin\src\types\index.ts
 */
export interface IResponse<T = any> {
  code: number;
  msg?: string;
  result: T;
  error?: Error;
}

export interface IMenubarList {
  id?: number | string;
  name: string;
  path: string;
  redirect?: string | { name: string };
  meta?: {
    icon: string;
    title: string;
    permission?: string[];
    activeMenu?: string; // 路由设置了该属性，则会高亮相对应的侧边栏
    noCache?: boolean; // 页面是否不缓存
    hidden?: boolean; // 是否隐藏路由
    alwaysShow?: boolean; // 当子路由只有一个的时候是否显示当前路由
    parentId?: string;
  };
  component?: (() => Promise<typeof import("*.vue")>) | string;
  children?: Array<IMenubarList>;
}
